/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"5DA1A9F0-57EC-4C89-BBB0-85901D8F201F",variableType:4}
 */
var fCliente = null;

/**
 * @type {String}
 *
 * @properties={typeid:35,uuid:"EA8A1AC5-A62E-40C5-BE86-6FF24BA729EA"}
 */
var fCodigo = null;

/**
 * @type {Date}
 *
 * @properties={typeid:35,uuid:"552409A2-A3F9-41E9-9101-0AE2AE8711E5",variableType:93}
 */
var fFechaIn = null;


/**
 * Perform the element default action.
 *
 * @param {JSEvent} [event] the event that triggered the action
 *
 * @properties={typeid:24,uuid:"39C325F5-9C5B-4878-BE92-B374C9E92705"}
 */
function cerrar(event) {
	plugins.window.cancelFormPopup()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"3A9B0F37-FD9A-45F2-B0FC-CAD730508467"}
 * @AllowToRunInFind
 */
function buscar(event) {
	forms.reservas_tbl.controller.find()
	
	forms.reservas_tbl.cliente_id							= fCliente
	forms.reservas_tbl.codigo_interno						= fCodigo
	forms.reservas_tbl.reservas_to_reserva_detalle.fecha_in	= fFechaIn
	
	if (forms.reservas_tbl.controller.search() == 0)
	{
		globals.DIALOGS.showInfoDialog('Aviso','No se encontraron reservas con esas condiciones','OK')
	}
	cerrar()
}
